//数据序列化类统一管理

import 'package:tplib/net/base_entity_factory.dart';

class CommEntityFactory with BaseEntityFactory{
  static final CommEntityFactory _singleton = CommEntityFactory._internal();

  static CommEntityFactory get instance => CommEntityFactory();


  factory CommEntityFactory() {
    return _singleton;
  }

  CommEntityFactory._internal(){
    //做一些操作
  }

   T? generateOBJ<T>(json) {
    if(json==null)return null;
    if (1 == 0) {
      return null;
    } else if (T.toString() == "String") {
      return json as T;
    } else {
      return null;
    }
  }
}